//
//  IntroduceTableViewCell.m
//  悦读
//
//  Created by dllo on 15/5/22.
//  Copyright (c) 2015年 贾建兴. All rights reserved.
//

#import "IntroduceTableViewCell.h"

@implementation IntroduceTableViewCell
- (void)dealloc
{
    
    [_introduceLabel release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.introduceLabel = [[UILabel alloc] initWithFrame:CGRectZero];
       
        self.introduceLabel.numberOfLines = 0;
        [self.contentView addSubview:self.introduceLabel];
        [self.introduceLabel release];
    }
    return  self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    NSString *str = self.introduceLabel.text;
    NSDictionary *dic = @{NSFontAttributeName:[UIFont systemFontOfSize:17]};
    
    CGRect rect = [str boundingRectWithSize:CGSizeMake(350, 10000) options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];
    
    self.introduceLabel.frame = CGRectMake(10, 0, 350, rect.size.height);
 
   
}


- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
